package com.example.news.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.news.pojo.entity.Article;
import com.example.news.pojo.vo.ArticleDetailVo;
import com.example.news.pojo.vo.ArticleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
      void updateStatus(@Param("id") int articleId, @Param("status") int status);
      Page<ArticleVo> userGetArticles(Page<Article> page,Integer typeId);
      Page<ArticleVo> adminGetArticles(Page<Article> page);

      ArticleDetailVo getArticleById(Integer articleId);
}